package com.ruoyi.project.system.controller;
import com.ruoyi.framework.aspectj.lang.annotation.Anonymous;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.TempDailySchedule;
import com.ruoyi.project.system.mapper.TempDailyScheduleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("/system/daily")
public class DailyScheduleController {

    @Autowired
    private TempDailyScheduleMapper tempMapper;

    /**
     * 前端主页大屏获取当天出诊信息
     */
    @GetMapping("/today")
    @Anonymous
    public AjaxResult getTodaySchedule() {
        Date today = new Date();
        List<TempDailySchedule> list = tempMapper.selectByCurrentDate(today);
        return AjaxResult.success(list);
    }

}